package com.platform.base.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.platform.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import com.platform.common.core.domain.BaseEntity;

/**
 * 温度采集器对象 temp_info
 * 
 * @author wangqi
 * @date 2020-09-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("temp_info")
public class TempInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 温度采集器id */
    @TableId(type = IdType.INPUT)
    private String tempId;

    /** 安装地址 */
    private Long locationId;

    /** 安装时间 */
    @Excel(name = "安装时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date installTime;

    /** 厂商id */
    private Long factoryId;

    @TableField(exist = false)
    @Excel(name = "热表位置", targetAttr = "locationName", type = Excel.Type.EXPORT)
    private BaseLocation location;

    @TableField(exist = false)
    @Excel(name = "生产厂商", targetAttr = "factoryName", type = Excel.Type.EXPORT)
    private BaseFactory factory;

    @Excel(name = "热表位置", type = Excel.Type.IMPORT)
    @TableField(exist = false)
    private String locationName;

    @Excel(name = "生产厂商", type = Excel.Type.IMPORT)
    @TableField(exist = false)
    private String factoryName;
}
